package com.lant.utils;

import org.springframework.ui.ModelMap;

public class ModelMapUtils {
	public static ModelMap toModelMap(Object object) {
		return (ModelMap) JsonUtils.parseJavaObject(JsonUtils.toJsonString(object), ModelMap.class);
	}

	public static <T> T parseJavaObject(ModelMap model, Class<T> cls) {
		return (T) JsonUtils.parseJavaObject(JsonUtils.toJsonString(model), cls);
	}
}